<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>GC3D</title>
<script type="text/javascript">
//<!--
function formCheck() {
	var send = false;
	// TODO list:
	// check all the data
	// test what you want
	// setTimeout afterSent, 2 sec
	// hide the form ?
	// return true = send form
	// return false = do not send
	if (confirm('Send the task through the Grid ?')) {
		send = true;
		document.getElementById("send").style.display = "none";
	}
	return send;
}

function afterSent() {
	// TODO
	// get the Task ID from the input taskid in the iframe
	// call DB via JSON Servlet with this TASKID
	// http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback
}
//-->
</script>
</head>

<body>
<h1>GC3D (test / alpha version)</h1>
<div id="send">
<p>Send a .pov file or a .zip archive contaning 1 .pov file and your .inc files (at the root)<br/>
then you'll get all the .png rendered by MegaPOV, and the .avi video encode in x264 by MEncoder</p>
<h2>Select file(s)</h2>
<!-- multipart/form-data
	http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1 -->
<form method="post" target="result" onsubmit="return formCheck();" action="GC3DServlet" enctype="multipart/form-data">
<h4>MegaPOV options</h4>
<input name="povfile" type="file"/><br>
<input name="aa" type="checkbox"/> Anti-aliasing<br/>
<input name="aat" type="text" value="0.1"/> Anti-aliasing Threshold<br/>

<input name="aad" type="text" value="2"/> Anti-aliasing Depth<br/>
<!--input name="cyclanim" type="checkbox" checked/> Cyclic Animation<br/-->
width <input name="width" type="text" value="640"/> height <input name="height" type="text" value="480"/><br/>
clock start <input name="clock_start" type="text" value="0"/> clock end <input name="clock_end" type="text" value="1"/><br/>
<input name="numberofframe" type="text" value="10"/> Number of frames<br/>
More options ?<br/>
<textarea name="moreopts" rows="5" cols="40"></textarea><br/>
<h4>MEncoder options</h4>
<input name="fps" type="text" value="10"/> FPS<br/>
<input name="x264bitrate" type="text" value="800"/> x264 bitrate<br/>

<input value="Send" type="submit"/>
</form>
</div>
<a href="#" onclick="document.getElementById('send').style.display = 'block'; return false;">form display</a><br/>
<!-- frame wich should be hiden -->
<iframe name="result" width="99%">iframe not supported</iframe>

<h2>Stats</h2>
<p>statistics/status of the server/grid/rendering (dynamic &amp; asynch)</p>
<a href="http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback">See jQuery.getJSON</a>
</body>
</html>
